package io.renren.modules.task.constant;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author: weihongyang
 * @Date: 2019-04-23 13:03:44
 * @Version 1.0
 */
public class ManagePublicMethod {
    /**
     *创建任务单号
     */
    public static String creatOrderCode(String orderType,String consonleCode,String num){
        String orderCode = null;
        Date date = new Date();
        SimpleDateFormat sdf= new SimpleDateFormat("yyyyMMddHHmmss");
        String bach= sdf.format(date);
        if(orderType.equals(ManageConstant.CALL_MATERIAL_ORDER_TYPE)) {
            orderCode=orderType+"-"+bach+"-"+consonleCode+"-"+num;
        }
        if(orderType.equals(ManageConstant.EMPTY_CAR_RETURN_ORDER_TYPE)) {
            orderCode=orderType+"-"+bach+"-"+consonleCode+"-"+num;
        }
        if(orderType.equals(ManageConstant.FINISH_GOOD_WARE_HOUSE_ORDER_TYPE)) {
            orderCode=orderType+"-"+bach+"-"+consonleCode+"-"+num;
        }
        if(orderType.equals(ManageConstant.CALL_MOUTH_ORDER_TYPE)) {
            orderCode=orderType+"-"+bach+"-"+consonleCode+"-"+num;
        }
        return orderCode;
    }
}
